﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SPublicEscort extends IMessageBase
    {
        public var code:int;
        public var type:int;
        public var toMap:int;
        public var color:int;
        public var life:int;
        public var canBeAttackEscort:Boolean;
        public var toPoint:SPoint;
        public const _type:int = 85;
        public static var _regist:SPublicEscort = new SPublicEscort(true);

        public function SPublicEscort(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SPublicEscort();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.code);
            param1.writeInt(this.type);
            param1.writeInt(this.toMap);
            param1.writeInt(this.color);
            param1.writeInt(this.life);
            param1.writeBool(this.canBeAttackEscort);
            this.toPoint.__write(param1);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.code = param1.readInt();
            this.type = param1.readInt();
            this.toMap = param1.readInt();
            this.color = param1.readInt();
            this.life = param1.readInt();
            this.canBeAttackEscort = param1.readBool();
            this.toPoint = new SPoint();
            this.toPoint.__read(param1);
            return;
        }// end function

    }
}
